package com.qf.service.impl;

import com.qf.dao.SysNewsDao;
import com.qf.entity.SysNews;
import com.qf.service.SysNewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysNewsServiceImpl implements SysNewsService {

    @Autowired
    private SysNewsDao sysNewsDao;

    public List<SysNews> getAll() {
        return sysNewsDao.getAll();
    }

    public void addNews(SysNews sysNews) {
         sysNewsDao.addNews(sysNews);
    }

    public void delNews(Integer id) {
        sysNewsDao.delNews(id);
    }

    public void deleteBatchNews(Integer[] ids) {
        sysNewsDao.deleteBatchNews(ids);
    }

    public void updateNews(SysNews sysNews) {
        sysNewsDao.updateNews(sysNews);
    }

    public List<SysNews> loadAllNews(String title) {
        return sysNewsDao.loadAllNews(title);
    }


}
